<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;  charset=utf-8" />
<meta name="author" content="liushuai" />
<meta name="copyright" content="SINA 1996-2010" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>个人中心管理后台 - 登录</title>
<link href="/admin/style/user/admin.css" type="text/css" rel="stylesheet" media="screen" />
<!--[if IE]>
<link href="/admin/style/user/admin_ie.css" type="text/css" rel="stylesheet" media="screen" />
<![endif]-->
<link href="/admin/style/jqueryui/redmond/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://www.sinaimg.cn/cj/dfz/js/base_v_0.1.js" charset="utf-8"></script> 
</head>

<body>

<div id="dialog" title="提示">
  <p id="dialog_text"></p>
</div>

<div class="header">
  <div class="logo"> <a href="http://www.sina.com.cn" target="_blank"> 新浪网<span></span> </a> </div>
  <h1 class="title"> 新浪地方站个人中心管理后台 </h1>
  <div class="extra-info"> </div>
</div>
<div class="wrap">
  <div class="login">
    <h3>登&nbsp;录</h3>
    <form class="logoform" id="form_login">
      <table cellpadding="0" cellspacing="0">
        <colgroup>
        <col class="col-label" />
        <col class="col-input" />
        <col class="col-tips" />
        </colgroup>
        <tr>
          <td><label>登录名：</label></td>
          <td><input type="text" name="username" id="username" /></td>
          <td><span class="tips">请输入您的登录名</span></td>
        </tr>
        <tr>
          <td><label>密码：</label></td>
          <td><input type="password" name="passwd" id="passwd" /></td>
          <td><span class="tips">请输入您的密码</span></td>
        </tr>
        <tr>
          <td colspan="3"><div class="banner-btn">
              <input type="submit" name="btn-login" id="form_login_submit" value="登&nbsp;录" />
           </td>
        </tr>
      </table>
    </form>
  </div>
</div>

<script type="text/javascript">
$(document).ready(function() {
	$("#username").bind('focus', function() {
		if($("#username").val() == '请输入您的登录名称') {
			$("#username").val('');
		}
	});


	//表单提交事件
	$("#form_login").bind('submit', function() {
		$.post('login_submit.php', $("#form_login").serialize(), function(data) {
			if (data.status == 1) {
				$("#dialog_text").html('<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>'+data.error);
				$("#dialog").dialog({
					bgiframe: true,
					modal: true,
					maxWidth: '620px',
					maxWidth: '400px',
					resizable: false,
					buttons: {
						'确认': function() {
							$(this).dialog('close');
							$(this).dialog('destroy');
						}
					}
				});
				$("#dialog").dialog("open");
			} else {
				//成功
				window.location.href="index.php";
			}
		}, 'json'); 
		return false;
	
	});
});

</script>

</body>
</html>